`include "common.svh"

module lsu_test #(
    parameter STQ_SIZE = 8
) (
    input clk,
    input rst,

    output empty,

    input i_valid,
    // input ISSUE_OP i_iop,
    input MEM_CMD i_req_cmd,
    input word_t i_req_addr,
    input PRF_IDX i_req_prf_idx,
    input ROB_PTR i_req_rob_idx,
    output i_ready,

    output o_valid,
    output PRF_IDX o_rsp_prf_idx,
    output ROB_PTR o_rsp_rob_idx,
    input o_ready,

    output o_rob_finish_valid,
    output ROB_PTR o_rob_finish_rob_idx,

    input i_rob_order_valid,
    input ROB_PTR i_rob_order_rob_idx,

    //DMEM REQ
    output o_dmem_valid,
    output MEM_CMD o_dmem_req_cmd,
    output word_t o_dmem_req_addr,
    output PRF_IDX o_dmem_req_prf_idx,
    output ROB_PTR o_dmem_req_rob_idx,
    input o_dmem_ready,
    output o_dmem_kill_prev,

    //DMEM RSP
    input i_dmem_valid,
    input PRF_IDX i_dmem_rsp_prf_idx,
    input ROB_PTR i_dmem_rsp_rob_idx,
    output i_dmem_ready

);
  /* verilator lint_off UNUSEDSIGNAL */
  MEM_REQ i_req;
  MEM_RSP o_rsp;
  MEM_REQ o_dmem_req;
  MEM_RSP i_dmem_rsp;
  /* verilator lint_on UNUSEDSIGNAL */
  always_comb begin
    i_req = 'b0;
    i_req.cmd = i_req_cmd;
    i_req.addr = i_req_addr;
    i_req.prf_idx = i_req_prf_idx;
    i_req.rob_idx = i_req_rob_idx;
    i_dmem_rsp = 'b0;
    i_dmem_rsp.prf_idx = i_dmem_rsp_prf_idx;
    i_dmem_rsp.rob_idx = i_dmem_rsp_rob_idx;
  end
  assign o_rsp_prf_idx = o_rsp.prf_idx;
  assign o_rsp_rob_idx = o_rsp.rob_idx;
  assign o_dmem_req_prf_idx = o_dmem_req.prf_idx;
  assign o_dmem_req_rob_idx = o_dmem_req.rob_idx;
  assign o_dmem_req_cmd = o_dmem_req.cmd;
  assign o_dmem_req_addr = o_dmem_req.addr;
  lsu #(STQ_SIZE) inst_lsq (.*);

endmodule
